import {
    createRouter,
    createWebHashHistory
} from "vue-router";

//默认路由
const routes = [
    {
        path: '/',
        redirect: '/login'
    },
    {
        path: "/login",
        name: 'login',
        component: () => import("../views/login/login.vue"),
    },
    {
        path: "/register",
        name: 'register',
        component: () => import("../views/login/register.vue")
    },
    {
        path: "/retrievePassword",
        name:'retrievePassword',
        component: () => import("../views/login/retrievePassword.vue"),
    },
    {
        path: "/home",
        name: 'home',
        component: () => import("../views/home/home.vue"),
    },
    {
        path: "/follow1",
        name: 'follow1',
        component: () => import("../views/follow/follow.vue"),
    },
    {
        path: "/rank",
        name: 'rank',
        component: () => import("../views/rank/rank.vue"),
    },
    {
        path: "/topic",
        name: 'topic',
        component: () => import("../views/topic/topic.vue"),
    },
    {
        path:'/follow2',
        name:'follow2',
        component:() => import("../views/find/follow.vue")
    },
    {
        path:'/talk',
        name:'talk',
        component:() => import("../views/find/talk.vue")
    },
    {
        path:'/talkDetails',
        name:'talkDetails',
        component:() => import("../views/find/talkDetails.vue")
    },
    {
        path: "/bangdanindex",
        name:'bangdanindex',
        component: () => import("../views/BangDan/index.vue"),
        children:[
            {
                path: "bangdan",
                name:'bangdan',
                component: () => import("../views/BangDan/BangDan.vue"),
            },
            {
                path:"bangdanx",
                name:"bangdanx",
                component:()=>import("../views/BangDan/BangDanX.vue")
            },
        ]
    },
    { path: '/:pathMatch(.*)*', name: 'NotFound', component:() => import("../views/404/NotFound.vue") },
];



const router = createRouter({
    history: createWebHashHistory(),
    routes,
});



export default router;